export interface resultType {
  is: boolean;
  msg?: string;
}

export interface allResult {
  key: string;
  msg: string;
}

export interface Role {
  key: string;
  value: any; //结果值
  //readonly?:boolean;//是否只读
  custom?: (value: any) => Promise<resultType> | resultType; //自定义验证方法
  required?: boolean; //是否必填 如果不是必填value是空 则不验证
  customReg?: RegExp | Array<RegExp>; //自定义正则
  reg?: string | Array<string>; //正则来源
  msg?: string | Array<string>; //错误提示
}

export interface RoleMapItem {
  key: string;
  value: any; //结果值
  //readonly?:boolean;//是否只读
  custom?: (value: any) => Promise<resultType> | resultType; //自定义验证方法
  required?: boolean; //是否必填 如果不是必填value是空 则不验证
  customReg?: Array<RegExp>; //自定义正则
  reg?: Array<string>; //正则来源
  msg?: Array<string>; //错误提示
}
